prefix=@prefix@
CFLAGS = @CFLAGS@
CFLAGS += -I/usr/src/linux/include -I. -include /usr/src/linux/include/linux/modversions.h
PROG = encode-gb.o

CC=gcc $(CFLAGS)
MODCFLAGS = -Wall -O2 -DMODULE -D__KERNEL__ -DLINUX

all: $(PROG)

$(PROG): encode-gb.mo 
	ld -m elf_i386 -r encode-gb.mo -o $(PROG)
encode-gb.mo: font_gb16.h encode-gb.c /usr/include/linux/version.h
	$(CC) $(MODCFLAGS) -c encode-gb.c -o encode-gb.mo

clean:
	rm -f a.out *.bak *.o *~ core encode-gb.mo $(PROG)

distclean: clean
	rm -f Makefile tags TAGS

install: all
	sh install_module.sh $(PROG)
